
package com.amigo.online.consumer.merchant.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import com.amigo.online.common.core.response.Response;
import com.amigo.online.common.param.dto.merchant.CommentReplyDto;
import com.amigo.online.common.param.dto.merchant.EditBasicMerchantDto;
import com.amigo.online.common.param.dto.merchant.MerchantApplyDto;
import com.amigo.online.common.param.dto.merchant.MerchantAvatarDto;
import com.amigo.online.common.param.dto.merchant.MerchantCommentDto;
import com.amigo.online.common.param.dto.merchant.MerchantEnvironmentDto;

/**
 * <code>MerchantOwnerService.java</code>
 * <p>
 * : rpc调用
 * </p>
 * <p>
 * 
 * @company Amigo
 * @author LuChen
 * @time 2018年12月21日 上午10:31:37
 * @version 1.0
 * @lastUpdate 无
 *             </p>
 */
@FeignClient(name = "amigo-online-provider-merchant")
public interface MerchantOwnerService {

	@RequestMapping(value = "/merOwner/getMerchantComment", method = RequestMethod.POST)
	ResponseEntity<Response> getMerchantComment(MerchantCommentDto dto);

	@RequestMapping(value = "/merOwner/getMerchantManagerList", method = RequestMethod.GET)
	ResponseEntity<Response> getMerchantComment(@RequestParam("merchantId") Long merchantId);

	@RequestMapping(value = "/merOwner/addManager", method = RequestMethod.GET)
	ResponseEntity<Response> addManager(@RequestParam("merchantId") Long merchantId,
			@RequestParam("userId") Long userId);

	@RequestMapping(value = "/merOwner/removeManager", method = RequestMethod.DELETE)
	ResponseEntity<Response> removeManager(@RequestParam("merchantId") Long merchantId,
			@RequestParam("userId") Long userId);

	@RequestMapping(value = "/merOwner/replyComment", method = RequestMethod.POST)
	ResponseEntity<Response> replyComment(CommentReplyDto dto);

	@RequestMapping(value = "/merOwner/applyOpen", method = RequestMethod.POST)
	ResponseEntity<Response> applyOpenMerchant(MerchantApplyDto dto);

	@RequestMapping(value = "/merOwner/merchant/avatar", method = RequestMethod.POST)
	ResponseEntity<Response> editMerchantAvatar(MerchantAvatarDto dto);

	@RequestMapping(value = "/merOwner/merchant/environment", method = RequestMethod.POST)
	ResponseEntity<Response> merchantEnvironment(MerchantEnvironmentDto dto);

	@RequestMapping(value = "/merOwner/merchant/basic", method = RequestMethod.POST)
	ResponseEntity<Response> editBasicMerchant(EditBasicMerchantDto dto);

	@RequestMapping(value = "/merOwner/getUserMerchantStatus", method = RequestMethod.GET)
	ResponseEntity<Response> getUserMerchantInfo();

	@RequestMapping(value = "/merOwner/getUserMerchantInfo/{status}", method = RequestMethod.GET)
	ResponseEntity<Response> getUserMerchantStatus(@PathVariable("status") Integer status);

	@RequestMapping(value = "/merOwner/categoryList", method = RequestMethod.GET)
	ResponseEntity<Response> getCategoryList(@RequestParam(value = "type", required = false) Integer type);

	@RequestMapping(value = "/merOwner/getMerchantManagerInfo/{id}", method = RequestMethod.GET)
	ResponseEntity<Response> getMerchantDetailInfo(@PathVariable("id") Long id);

	@RequestMapping(value = "/merOwner/merchantGoods", method = RequestMethod.GET)
	ResponseEntity<Response> getMerchantGoods(@RequestParam(value = "merchantId") Long merchantId,
			@RequestParam(value = "status", required = false) Integer status,
			@RequestParam(value = "categoryId", required = false) Long categoryId,
			@RequestParam(value = "page") Integer page, @RequestParam(value = "size") Integer size);
	
	@RequestMapping(value = "/merOwner/quitManager", method = RequestMethod.DELETE)
	ResponseEntity<Response> quitManager(@RequestParam("merchantId")Long merchantId);

}
